<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="common/include :: header('编辑物品分类')" />
</head>
<body class="white-bg">
	<div class="wrapper wrapper-content animated fadeInRight ibox-content">
		<form class="form-horizontal m" id="form-post-add">
            <input type="hidden" name="id" th:value="${goodsCategory.id}">
			<div class="form-group">
				<label class="col-sm-3 control-label is-required">上级分类：</label>
                <div class="col-sm-8">
                    <!--<select th:field="${goodsCategory.parentId}" class="form-control" readonly name="parentId">
                        <option th:text="请选择" value=""></option>
                        <option th:each="GoodsCategory:${GoodsCategorys}" th:text="${GoodsCategory.categoryName}" th:value="${GoodsCategory.id}" ></option>
                    </select>-->
                    <input class="form-control" type="text" th:value="${supperCategory?.categoryName}" readonly name="supperCategory" id="supperCategory" required>
                </div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label is-required">分类名称：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" th:value="${goodsCategory.categoryName}" name="categoryName" id="categoryName" required>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label is-required">描述：</label>
				<div class="col-sm-8">
					<textarea class="form-control" th:field="${goodsCategory.categoryDesc}" name="categoryDesc" id="categoryDesc" required></textarea>
				</div>
			</div>
		</form>
	</div>
	<th:block th:include="common/include :: footer" />
	<th:block th:include="common/include :: datetimepicker" />
	<script type="text/javascript">

		var prefix = ctx + "/business/goodsCategory";
		
		function submitHandler() {
	        if ($.validate.form()) {
	        	$.operate.save(prefix + "/edit", $('#form-post-add').serialize());
	        }
	    }

	</script>
</body>
</html>
